/// @tags: MoDuionTreewithModify
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>

using namespace std;

namespace BlueQuantum {

typedef long long ll;

int const N = 1e5 + 5;

struct Query {
  int l, r, lbel, rbel, t, id;
  Query() {}
  Query(int l, int r, int lbel, int rbel, int t, int id)
      : l(l), r(r), lbel(lbel), rbel(rbel), t(t), id(id) {}
  inline bool operator<(Query const& rhs) const {
    return lbel == rhs.lbel ? (r == rhs.r ? ((lbel ^ rbel) & 1) ^ (t < rhs.t)
                                          : ((lbel & 1) ^ (rbel > rhs.rbel)))
                            : lbel < rhs.lbel;
  }
} q[N];

struct Modify {
  int x, c;
} t[N];

struct Edge {
  int v, nxt;
} e[N << 1];

int n, m, e_cnt, cnt, B, q_cnt, m_cnt, L, R, T;
int dfn[N << 1], col[N << 1];
typedef int Array[N];
Array fa, heads, siz, val, w, idfn, dep, son, top, vis, buk;
ll cur, ans[N];

void dfs(int u) {
  dep[u] = dep[fa[u]] + (siz[u] = 1);
  for (int i = heads[u], v; i; i = e[i].nxt)
    if ((v = e[i].v) != fa[u]) {
      fa[v] = u;
      dfs(v), siz[u] += siz[v];
      if (siz[v] > siz[son[u]]) son[u] = v;
    }
}

void dfs(int u, int t) {
  top[u] = t;
  dfn[idfn[u] = ++cnt] = u;
  if (son[u]) dfs(son[u], t);
  for (int i = heads[u], v = e[i].v; i; i = e[i].nxt)
    if ((v = e[i].v) != fa[u] && v != son[u]) dfs(v, v);
  dfn[++cnt] = u;
}

inline int getLCA(int u, int v) {
  for (; top[u] ^ top[v]; dep[top[u]] > dep[top[v]] ? u = fa[top[u]] : v = fa[top[v]]) {}
  return dep[u] < dep[v] ? u : v;
}

inline void add(int u, int v) {
  e[++e_cnt].v = v, e[e_cnt].nxt = heads[u], heads[u] = e_cnt;
}

inline void solve(int x) {
  int c = col[x];
  (vis[x] ^= 1) ? cur += (ll)w[++buk[c]] * val[c] : cur -= (ll)w[buk[c]--] * val[c];
}

inline void modify(int i) {
  int u = t[i].x, x = t[i].c, y = col[u];
  vis[u] && (cur += (ll)w[++buk[x]] * val[x] - (ll)w[buk[y]--] * val[y]);
  t[i].c = y, col[u] = x;
}

inline int main() {
  cin >> n >> m;
  int x, y, u, v, g = 0;
  cin >> x;
  for (int i = 1; i <= m; ++i) cin >> val[i];
  for (int i = 1; i <= n; ++i) cin >> w[i];
  m = x;
  for (int i = 2; i <= n; ++i) cin >> u >> v, add(u, v), add(v, u);
  for (int i = 1; i <= n; ++i) cin >> col[i];
  dfs(1), dfs(1, 1);
  for (int opt, x, y; m; --m) {
    cin >> opt;
    switch (opt) {
      case 0:
        cin >> x >> y;
        ++m_cnt;
        t[m_cnt].x = x, t[m_cnt].c = y;
        break;
      case 1:
        cin >> x >> y;
        if (idfn[x] > idfn[y]) swap(x, y);
        ++q_cnt;
        q[q_cnt] = Query(x, y, idfn[x], idfn[y], m_cnt, q_cnt);
    }
  }
  B = pow(n, m_cnt ? 2.0 / 3 : 1.0 / 2);
  for (int i = 1; i <= q_cnt; ++i) q[i].lbel /= B, q[i].rbel /= B;
  sort(q + 1, q + q_cnt + 1);
  L = idfn[q[1].l], R = L - 1;
  for (int i = 1; i <= q_cnt; ++i) {
    x = idfn[u = q[i].l], y = idfn[v = q[i].r], g = q[i].t;
    while (L > x) solve(dfn[--L]);
    while (R < y) solve(dfn[++R]);
    while (L < x) solve(dfn[L++]);
    while (R > y) solve(dfn[R--]);
    while (T < g) modify(++T);
    while (T > g) modify(T--);
    int lca = getLCA(u, v);
    if (u != lca) {
      solve(u);
      if (v != lca) solve(lca);
    }
    ans[q[i].id] = cur;
    if (u != lca) {
      solve(u);
      if (v != lca) solve(lca);
    }
  }
  for (int i = 1; i <= q_cnt; ++i) cout << ans[i] << '\n';
  return 0;
}

}  // namespace BlueQuantum

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("P4074 [WC2013] 糖果公园.in", "r", stdin);
  freopen("P4074 [WC2013] 糖果公园.out", "w", stdout);
#endif
#endif

  ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  return BlueQuantum::main();
}
